home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / urllauncher.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-08-07  |  1.3 KB  |  54 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7.  
  8. //Added by Craig Bradney in August 2007
  9. //To be used for external browser URL launching
  10.  
  11. #ifndef URLLAUNCHER_H
  12. #define URLLAUNCHER_H
  13.  
  14. #include <QObject>
  15. #include <QString>
  16. #include <QUrl>
  17. #include <QWidget>
  18. #include "scribusapi.h"
  19.  
  20. class SCRIBUS_API UrlLauncher : public QObject
  21. {
  22.     Q_OBJECT;
  23.     
  24.     public:
  25.         UrlLauncher();
  26.         ~UrlLauncher();
  27.  
  28.         /**
  29.          * @brief Returns a pointer to the UrlLauncher instance
  30.          * @return A pointer to the UrlLauncher instance
  31.          */
  32.         static UrlLauncher* instance();
  33.         /**
  34.          * @brief Deletes the UrlLauncher Instance
  35.          * Must be called when UrlLauncher is no longer needed.
  36.          */
  37.         static void deleteInstance();
  38.         
  39.     public slots:
  40.         void launchUrlExt(const QString& link, QWidget *parent=0);
  41.         void launchUrlExt(const QUrl& link, QWidget *parent=0);
  42.  
  43.     private:
  44.         /**
  45.         * @brief The only instance of UrlLauncher available.
  46.         *
  47.         * UrlLauncher is singleton and the instance can be queried with the method
  48.         * instance().
  49.         */
  50.     static UrlLauncher* _instance;
  51. };
  52.  
  53. #endif
  54.